package com.example.userservice.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserDTO {
    private Long userId;

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "密码不能为空")
    private String password;

    @NotBlank(message = "Email 不能为空")
    @Email(message = "Invalid email format")
    private String email;

    @Pattern(regexp = "^$|^1[3-9]\\d{9}$", message = "Invalid phone number format")
    private String phone;

    private String realName;
}
